Optimal. Leaf size=26 \[ \frac{b \tanh ^{-1}(\sin (c+d x))}{d}-\frac{a \tanh ^{-1}(\cos (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.029023, antiderivative size = 26, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 2, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.118, Rules used = {3517, 3770} \[ \frac{b \tanh ^{-1}(\sin (c+d x))}{d}-\frac{a \tanh ^{-1}(\cos (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3517
Rule 3770
Rubi steps
\begin{align*} \int \csc (c+d x) (a+b \tan (c+d x)) \, dx &=\int (a \csc (c+d x)+b \sec (c+d x)) \, dx\\ &=a \int \csc (c+d x) \, dx+b \int \sec (c+d x) \, dx\\ &=-\frac{a \tanh ^{-1}(\cos (c+d x))}{d}+\frac{b \tanh ^{-1}(\sin (c+d x))}{d}\\ \end{align*}
Mathematica [A] time = 0.0237081, size = 52, normalized size = 2. \[ \frac{a \log \left (\sin \left (\frac{c}{2}+\frac{d x}{2}\right )\right )}{d}-\frac{a \log \left (\cos \left (\frac{c}{2}+\frac{d x}{2}\right )\right )}{d}+\frac{b \tanh ^{-1}(\sin (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.036, size = 42, normalized size = 1.6 \begin{align*}{\frac{a\ln \left ( \csc \left ( dx+c \right ) -\cot \left ( dx+c \right ) \right ) }{d}}+{\frac{b\ln \left ( \sec \left ( dx+c \right ) +\tan \left ( dx+c \right ) \right ) }{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.53495, size = 62, normalized size = 2.38 \begin{align*} \frac{b{\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 2 \, a \log \left (\cot \left (d x + c\right ) + \csc \left (d x + c\right )\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.35074, size = 170, normalized size = 6.54 \begin{align*} -\frac{a \log \left (\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) - a \log \left (-\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) - b \log \left (\sin \left (d x + c\right ) + 1\right ) + b \log \left (-\sin \left (d x + c\right ) + 1\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \tan{\left (c + d x \right )}\right ) \csc{\left (c + d x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.41334, size = 66, normalized size = 2.54 \begin{align*} \frac{b \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1 \right |}\right ) - b \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1 \right |}\right ) + a \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) \right |}\right )}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]